//
//  EconomicCalendar.h
//  Chart
//
//  Created by CaoJun on 15/1/22.
//
//

#ifndef __Chart__EconomicCalendar__
#define __Chart__EconomicCalendar__

#include "AVGData.h"
#include "IndexData.h"
#include "Rectangle.h"
#include "YTXChartStyle.h"

#include <utility>
#include <vector>
#include <string>

namespace ytx
{
    class EconomicCalendar : public IndexData
    {
    public:
        EconomicCalendar(IndexConfig indexConfig);
        virtual ~EconomicCalendar();
        
        std::vector<EconomicCalendarData> economicCalendarData;
        
        virtual bool hasCrosshairsYData() const;
        virtual bool hasData() const;
        virtual bool hasData(int index) const;
        virtual void calculate(Quotation * data);
        virtual std::string getCrosshairYData(int index);
        virtual std::pair<double, double> getAdjustedDataMinMax(int startIndex, int endIndex, const Rectangle & rect) const;
        virtual std::vector<std::pair<double, std::string> > getLeftSideText(int startIndex, int endIndex, const Rectangle & rect, const Style & style) const;
        virtual std::vector<std::pair<std::string, std::string> > getTopSideText(const std::vector<std::vector<double> > & data, int index) const;
        virtual std::pair<std::string, std::string> getTopSideInfoText() const;
        virtual void initInfo(Quotation * data);
        virtual int getDataLength() const;
    };
}

#endif /* defined(__Chart__EconomicCalendar__) */
